
#include <stdio.h>
#include <SDL/SDL.h>



int main ( int argc, char** argv )
{

 SDL_Event event;

    freopen("CON","w",stdout);
    freopen("CON","r",stdin);


    if ( SDL_Init( SDL_INIT_VIDEO ) < 0 )
    {
        printf( "Unable to init SDL: %s\n", SDL_GetError() );
        return 1;
    }

    SDL_Surface* screen = SDL_SetVideoMode(1230,692, 16,SDL_HWSURFACE|SDL_DOUBLEBUF);
    SDL_Surface* bmp1 = SDL_LoadBMP("mini.bmp");
    SDL_Surface* bmp2;
    SDL_Surface* bmp3;
    SDL_Surface* bmp4;
    SDL_Surface* bmp5;
    SDL_Rect dstrect;
     dstrect.x = (screen->w - bmp->w) / 2;
    dstrect.y = (screen->h - bmp->h) / 2;

    while(1)
    { while (SDL_PollEvent(&event))
    {
        switch(event.type)
        {

        case SDL_MOUSEMOTION:


           {

            int x=event.motion.x;
            int y=event.motion.y;
        printf("%d \t",x);
        SDL_FillRect(screen, 0, SDL_MapRGB(screen->format, 0, 0, 0));
    SDL_BlitSurface(bmp, 0, screen, &dstrect);
    SDL_Flip(screen);
           }
        }
    }
    }
    return 0;}
